package com.chenxbook.modules.boot.web.message;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * 查询返回对象总包装类
 *
 * @author chenxbook
 * @date 2020-04-17
 **/
public class QueryRespBean<T> implements Serializable {
    private static final long serialVersionUID = 2874174573783585824L;

    /**
     * 分页参数
     */
    private PageParameter pageParameter = null;

    /**
     * 返回结果集合
     */
    @ApiModelProperty("result,返回结果集合")
    private List<T> result = null;

    public QueryRespBean() {
        super();
    }

    public QueryRespBean(PageParameter pageParameter, List<T> result) {
        super();
        this.pageParameter = pageParameter;
        this.result = result;
    }


    public PageParameter getPageParameter() {
        if (pageParameter == null) {
            pageParameter = new PageParameter();
        }
        return pageParameter;
    }

    public void setPageParameter(PageParameter pageParameter) {
        this.pageParameter = pageParameter;
    }


    public List<T> getResult() {
        return result;
    }

    public void setResult(List<T> result) {
        this.result = result;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("QueryRespBean [pageParameter=");
        builder.append(pageParameter);
        builder.append(", result=");
        builder.append(result);
        builder.append("]");
        return builder.toString();
    }


}
